package com.bitin.adorn.demo.model;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Mr.Lu
 * @since 2024/8/26 15:11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "role")
public class Role {

    @Id
    private Long id;

    private String name;

    @ManyToOne
    @JoinColumn(name = "uid", referencedColumnName = "id", updatable = false)
    private User user;
}
